﻿namespace Marc.JwOrgClient.Model {
    using System;

    public class PodcastMagazineChapter {
        private readonly int index;
        private readonly string _title;
        private readonly string _description;
        private readonly Uri _link;
        private readonly long _bytes;
        private readonly string _filename;

        public PodcastMagazineChapter(int index, string title, string description, Uri link, long bytes, string filename) {
            this.index = index;
            this._title = title;
            this._description = description;
            this._link = link;
            this._bytes = bytes;
            this._filename = filename;
        }

        public string Title {
            get { return this._title; }
        }

        public string Description {
            get { return this._description; }
        }

        public Uri Link {
            get { return this._link; }
        }

        public long Bytes {
            get { return this._bytes; }
        }

        public string Filename {
            get { return this._filename; }
        }

        public PodcastMagazine Magazine { get; internal set; }

        public int Index
        {
            get { return this.index; }
        }

        public override string ToString() {
            return string.Format("'{0}' to be downloaded from {1}", this.Title, this.Link);
        }

    }
}